package gui;

import java.awt.Color;
import java.awt.Font;
import java.awt.GridBagLayout;
import javax.swing.JPanel;
import java.awt.Dimension;
import javax.swing.JScrollPane;
import java.awt.Rectangle;
import java.io.File;
import java.util.HashMap;

import javax.swing.ImageIcon;
import javax.swing.JTable;
import javax.swing.JLabel;

import code.Language;
import code.Settings;

public class DataIntegrityListFiles extends JPanel {
	
	Color c= new Color(0x80, 0x80, 0xFF);

	private static final long serialVersionUID = 1L;
	private JScrollPane jScrollPane = null;
	private JTable jTable = null;
	private JLabel jLabel = null;

	private JLabel jLabel1 = null;
	
	private HashMap labels;

	ATOCOmain atocoframe;
	private Settings s;
	
	/**
	 * This is the default constructor
	 */
	public DataIntegrityListFiles(ATOCOmain atocoframe) {
		super();
		Settings s = new Settings();
		Language l = new Language();
		labels = l.changeLanguage((String) s.global.get("language"), "DataIntegrityListFiles", (String) s.global.get("installPath"));
		this.atocoframe=atocoframe;
		initialize();
		this.setPreferredSize( new Dimension( 400, 500 ) );
	}

	/**
	 * This method initializes this
	 * 
	 * @return void
	 */
	private void initialize() {
		jLabel1 = new JLabel();
		jLabel1.setBounds(new Rectangle(39, 20, 392, 28));
		jLabel1.setText((String) labels.get("jLabel1"));
		jLabel1.setFont(new java.awt.Font("Comic Sans MS", Font.BOLD, 14));
		jLabel = new JLabel(new ImageIcon((String) s.global.get("installPath") + File.separator + "images/en/broom.gif"));
		jLabel.setBounds(new Rectangle(454, 121, 190, 124));
		jLabel.setText((String) labels.get("jLabel"));
		jLabel.setForeground(c);
		this.setSize(681, 380);
		this.setLayout(null);
		this.add(getJScrollPane(), null);
		this.setBackground(Color.WHITE);
		this.add(jLabel, null);
		this.add(jLabel1, null);
	}

	/**
	 * This method initializes jScrollPane	
	 * 	
	 * @return javax.swing.JScrollPane	
	 */
	private JScrollPane getJScrollPane() {
		if (jScrollPane == null) {
			jScrollPane = new JScrollPane();
			jScrollPane.setBounds(new Rectangle(40, 73, 383, 254));
			jScrollPane.setViewportView(getJTable());
		}
		return jScrollPane;
	}

	/**
	 * This method initializes jTable	
	 * 	
	 * @return javax.swing.JTable	
	 */
	private JTable getJTable() {
		if (jTable == null) {

//			String col1 = "File Name";
//			String col2 = "File Path";
//			String col3 = "Creation Date";
			
			Object rowData[][] = { { "Row1-Column1", "Row1-Column2", "Row1-Column3" },
					{ "Row2-Column1", "Row2-Column2", "Row2-Column3" } };
			Object columnNames[] = { (String) labels.get("col1"), (String) labels.get("col2"), (String) labels.get("col3") };


			jTable = new JTable(rowData, columnNames);
		}
		return jTable;
	}

}  //  @jve:decl-index=0:visual-constraint="10,10"
